<%@ include file="/WEB-INF/jsp/include/taglibs.jspf" %>
<%-- 
    Document   : iklan_search_form
    Created on : Jul 5, 2013, 11:21:31 AM
    Author     : fikri
--%>
<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<script type="text/javascript">

    function edit(id) {
        frm = document.forms.frm1;
        frm.action = frm.action + '?editIklan&id=' + id;
        frm.submit();
    }
    
    function deleteIklan (id) {
       
        frm = document.forms.frm1;
        var r=confirm("Pengumuman akan di padam. Setuju?");
        if(r){
             frm.action = frm.action + '?deleteIklan&id=' + id;
             frm.submit();
        }else{
            return;
        }
    }
    

</script>

<s:messages/>
<s:errors/>

<s:form beanclass="th.stripes.action.AdminAction" name="frm1">
    <div id="content">
        <div id="logo">
            <span>
                <img src="${pageContext.request.contextPath}/images/img/ribbon.png"/>               
            </span>
        </div>
        <h3>
            Carian Iklan
        </h3>
        <p>
            <display:table style="width:100%" class="tablecloth" name="${actionBean.senaraiIklan}" 
                           pagesize="10" cellpadding="0" cellspacing="0" id="row" requestURI="/sesi/senarai">
                <display:column title="Bil." style="text-align:center">
                    ${row_rowNum} 
                </display:column>
                <display:column title ="Keterangan">
                    ${row.keterangan}
                </display:column>
                <display:column title="Aktif" style="text-align:center">                   
                    <c:if test="${fn:contains(row.aktif, 'Y')}">
                        YA
                    </c:if>
                    <c:if test="${fn:contains(row.aktif, 'T')}">
                        TIDAK
                    </c:if>
                </display:column>              
                <display:column title="Kemaskini" style="text-align:center">
                      <img src="${pageContext.request.contextPath}/images/edit.gif" 
                         onclick="edit('${row.idIklan}');"/>
                     <img src="${pageContext.request.contextPath}/images/delete.gif" 
                         onclick="deleteIklan('${row.idIklan}');"/>
                </display:column>              
            </display:table>
        </p>
        <p>
            <label>&nbsp;</label>
            <s:submit name="showFormAddIklan" value="Tambah Baru" class="button green"/>
        </p>
    </div>
</s:form>

